package com.alan.validate.constraints.Impl;

import com.alan.validate.constraints.IDCard;
import com.alan.validate.util.IDCardValid;
import com.alan.validate.util.ParamValidate;

public class IdCardValidate implements ParamValidate<IDCard,String> {

	
	public void initialize(IDCard constraintAnnotation){
	}
	
	public boolean isValid(String value) {
		if (value == null || value.trim().length() < 4) {
			return false;
		}
		IDCardValid valid = new IDCardValid();
		return valid.verify(value);
	}

}
